package com.bothin.experiment4.dto;

import lombok.Data;

import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by bothin
 * At 2019/12/21 20:12
 * Description:
 */
@Data
public class AnalyDTO {
    private List<String> title;
    private List<StatisticDTO> data;

    public AnalyDTO(List<StatisticDTO> data) {
        this.data = data;
        this.title = data.stream().map(e->e.getName()).collect(Collectors.toList());
    }
}
